package com.yuanheng100.ems4j.common.constant;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by j4love on 2016/12/13.
 * Description : 性别
 */
public enum Gender implements Serializable
{

    MALE((short) 1, "男"),
    FEMALE((short) 2, "女");

    public Short code;
    public String name;
    public static Map<Short, Gender> genderMap = new HashMap<Short, Gender>();
    public static List<Map<String,Object>> genderList = new ArrayList<Map<String, Object>>();

    static
    {
        for (Gender eachStatus : Gender.values())
        {
            genderMap.put(eachStatus.code, eachStatus);
            Map<String,Object> m = new HashMap<String, Object>();
            m.put("code",eachStatus.code);
            m.put("name",eachStatus.name);
            genderList.add(m);
        }

    }

    Gender(Short code, String name)
    {
        this.code = code;
        this.name = name;
    }


}
